import { NextRequest } from 'next/server';
import { cookies } from 'next/headers';
import { getUser } from '@/lib/db/queries';
import { redirect } from 'next/navigation';

export async function GET(request: NextRequest) {
  try {
    const user = await getUser();
    if (user) {
      redirect('/dashboard');
    }
  } catch (error) {
    // 用户未登录，不做任何操作，显示首页
  }
} 